<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   
    <style>
        .one {
            width: 500px;
            height: 200px;
            background-color: rgb(90, 98, 211);
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: auto;
        }
        
        input {
            height: 50px;
            width: 400px;
            border-radius: 20px;
            margin-left: 20px;
            margin-top: 10px;
            font-size: 20px;
            border: none;
        }
        
        .tow {
            height: 200px;
            width: 450px;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: auto;
        }
    </style>
</head>

<body>
    <div class="one">
        <div class="tow">
            账号<input type="text" id="Put"><br> 密码 <input type="password" id="mima">
            <button id="regist">登录</button>
        </div>
    </div>
</body>

</html>
<script type="text/javascript">
	var regist=document.querySelector("#regist");
	var  put=document.querySelector("#Put");
	var  mima=document.querySelector("#mima")
	regist.onclick=function(){
		addCookie(put.value,mima.value,3000)
		console.log("jj");console.log(document.cookie);
	}
	
	var one=document.cookie.split("=");
	console.log(one);
	put.onblur=function(){
		if(put.value==one[0]){
			window.open("跳转.html");
		}
	}
	
</script>
<script src="../../事件存储/cookie.js" type="text/javascript" charset="utf-8"></script>